{% assign page = post | default: page %}

{% if page.read_time or page.show_date %}
  <p class="page__meta">

    {% if page.show_date %}
      <span class="post__meta-date">
        {% assign date = page.date %}
        <i class="far fa-fw fa-calendar-alt" aria-hidden="true"></i>
        <time datetime="{{ date | date_to_xmlschema }}">{{ date | date: "%Y 年 %-m 月 %-d 日" }}</time>
      </span>
    {% endif %}

    {% if page.read_time and page.show_date %}
      {% if include.type == "grid" %}
        <br \>
      {% else %}
      <span class="post__meta-sep"></span>
      {% endif %}
    {% endif %}

    {% if page.read_time %}
      <span class="post__meta-read-time">
        {% assign words_per_minute = page.words_per_minute | default: site.words_per_minute | default: 200 %}
        {% assign words = page.content | strip_html | number_of_words %}

        <i class="far fa-fw fa-clock" aria-hidden="true"></i>
        {% if words < words_per_minute %}
          {{ site.data.ui-text[site.locale].less_than | default: "less than" }} 1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
        {% elsif words == words_per_minute %}
          1 {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
        {% else %}
          {{ words | divided_by: words_per_minute }} {{ site.data.ui-text[site.locale].minute_read | default: "minute read" }}
        {% endif %}
      </span>
    {% endif %}

  </p>
{% endif %}
